[1]MQTT IOT APP

福建IOT APP配置文件说明

配置文件

湖南益阳现场对接记录

命令下发

esdk/terminal/cmdReq/@manufacturerId/@manufacturerName/@deviceType/@model/@nodeId { "body":{ "requestId": "xxxxxx", "serviceId": "xxxxxx", "method":"xxxxxxx", "cmdContent": {"status":"OPEN"} }, "token": "4d4a36a4-bfdf-11d3-9ab7-06e863fbd23d", "timestamp": "2000-01-01T00:06:31Z" }

样例:
esdk/terminal/cmdReq/1234/smartchip/ADC/ADC/0A000000000000011001202803104136 { "token" : "6", "timestamp" : "2021-07-01T10:35:57.260299+0800", "body" : { "cmdContent" : { "PhV_phsA" : " ", "PhV_phsB" : " ", "PhV_phsC" : " " }, "method" : "analog_Get", "requestId" : "2023", "serviceId" : "analog" } }

命令响应

@app/terminal/cmdRsp/@manufacturerId/@manufacturerName/@deviceType/@model/@nodeId { "body":{ "requestId": "xxxxxxxx", "serviceId": "xxxxxx", "serviceProperties": {"status":"OPEN"} }, "token": "4d4a36a4-bfdf-11d3-9ab7-06e863fbd23d", "timestamp": "2000-01-01T00:06:31Z" }

样例:

forwardApp/terminal/cmdRsp/1234/smartchip/ADC/ADC/0A000000000000011001202803104136 { "body" : { "requestId" : "2023", "serviceId" : "analog", "serviceProperties" : { "PhV_phsA" : "231.416992", "PhV_phsB" : " 0.000000", "PhV_phsC" : " 0.000000" } }, "timestamp" : "2021-07-01T10:35:57.293+0800", "token" : "6" }

附:nodeId构成---devType+ioType+ioSn+taddr+esn
样例---0A000000000000011001202803104136
0B000000000000071001202803104136

设备注册信息
{
"model" : "ADC",
"port" : "1",
"body" : [ {
"guid" : "5aeeb33b6dcaceff",
"dev" : "ADC_5aeeb33b6dcaceff",
"addr" : "1",
"desc" : "jiao liu cai ji",
"manuID" : "1234",
"isreport" : "1",
"nodeID" : "",
"productID" : ""
}]
},
{
"model" : "TypeTest",
"port" : "7",
"body" : [ {
"guid" : "4069b2ccdc843b17",
"dev" : "TypeTest_4069b2ccdc843b17",
"addr" : "7",
"desc" : "typeuserdefineatuo",
"manuID" : "1357",
"isreport" : "1",
"nodeID" : "",
"productID" : ""
} ]
}

"model"的内容和转发配置文件决定devType:
假设转发配置文件NodeIdTransfer部分的配置如下所示
"NodeIdTransfer":{
"0A":["ADC"],
"0B":["TypeTest"]
},
那么ADC对应0A,TypeTest对应0B

"port"的内容决定ioType+ioSn,关联表如下:
RS485 = 11
FE0 = 23
PLC = 32
UMW = 44
RS485-1 = 11
RS485-2 = 21
RS485-3 = 31
RS485-4 = 41 其它 = 00

"addr"的值决定taddr,不足12位左补0至12位,超过12位但不超过24位左补0至24位,超过24位不再补0 0A---model为ADC,00---port为1,000000000001---addr为1,1001202803104136---esn
0B---model为TypeTest,00---port为7,000000000007---addr为7,1001202803104136---esn

命令下发:

esdk/terminal/cmdReq/DAQO/smartchip/RCD/RCD/03130000000000011001200900300188 { "token": "14", "timestamp": "2021-07-12T16:13:46.990924+0800", "body": { "cmdContent": { "RemCtl_TrCtl": "HZ" }, "method": "commad_HZ", "requestId": "24144", "serviceId": "command" } }

命令响应(确认是否按下面格式):

@app/terminal/cmdRsp/DAQO/DAQO/RCD/RCD/03130000000000011001200900300188 { "body":{ "requestId": "24144", "serviceId": "command", "serviceProperties": {"RemCtl_TrCtl":"HZ"} }, "token": "4d4a36a4-bfdf-11d3-9ab7-06e863fbd23d", "timestamp": "2000-01-01T00:06:31Z" }

最后更新于 10th Nov 2021